<template>
  <dt-modal-info ref="info" title="入账情况" :width="500" :line-number='2' :label-width='80'>
    <div slot='bottom'>
      <dt-grid ref="table" :list='list' :height='500' />
    </div>
  </dt-modal-info>
</template>

<script>
  export default {
    data() {
      return {
        options: [{
          title: '所属组织',
          key: 'orgName',
          text: {}
        }, {
          title: '案场名称',
          key: 'housesName',
          text: {}
        }],
        columns: {
          options: () => {
            return [{
              field: 'accountingCompany',
              title: '入账公司',
              minWidth: 160,
            }, {
              field: 'settledAgentCost',
              title: '入账金额(元)',
              minWidth: 160,
              cell: {
                text: {
                  type: 'number'
                }
              }
            }]
          }
        },
        info: null,
        list: []
      }
    },
    methods: {
      show(info) {
        this.info = info
        this.list = info.accountingCompanyResps
        this.$refs.info.show(this.options, this.info)
        this.$refs.table.init(this, this.columns)
      },
      hide() {
        this.$refs.info.hide()
      },
    }
  }
</script>

<style lang="scss" scoped>
</style>
